package com.example.myblog;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootApplication
@MapperScan("com.example.myblog")
// 开启定时任务服务
@EnableScheduling
public class MyblogApplication implements WebMvcConfigurer {

    public static void main(String[] args) {
        SpringApplication.run(MyblogApplication.class, args);
    }

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**")
                .addResourceLocations(
                        "file:/D:/_文件柜/123/c123_2516/myblog/myblog/src/main/resources/static/",
                        "file:/D:/_文件柜/123/c123_2516/myblog/login-starter/src/main/resources/static/")
        ;
    }

}
